Image processing for expressing gradation

ABSTRACT

An image processing technology to correct pixel values of input pixels is provided. First, a conversion relationship indicating the relationship between input pixel values and first tone-corrected values obtained by correction of the input pixel values is established. Based on this conversion relationship, the input pixel values are then converted to first tone-corrected values having a higher number of bits than the input pixels. From the first tone-corrected values, second tone-corrected values having a smaller number of bits than the first tone-corrected values are then generated. During this process, the second tone-corrected values is generated such that a tone of the first tone-corrected values is reproduced by multiple second tone-corrected values for multiple mutually adjacent pixels.

TECHNICAL FIELD

The present invention relates to a digital image processing technologyfor carrying out tone expression.

BACKGROUND ART

Correction of input pixel values and conversion thereof intotone-corrected values (hereinafter termed ‘conventional correctedvalues’) in order to correct brightness and color balance and obtaindesired images is commonly carried out. (See, for example, JP2002-223358A)

When this process is employed, the number of bits included in theconventional corrected value is identical to the number of bits includedin the input image value.

FIGS. 10A through 10D show the process for determining the conventionalcorrected value in the technology of the prior art. FIG. 10A is a tonecurve showing the relationship between an input pixel value DI and aconventional corrected value J, and shows an example in which both theinput pixel value DI and the conventional corrected value J have eightbits. FIG. 10B shows an example in which the value 127 of the inputpixel value DI for a given input pixel is corrected according to thetone curve to generate a resultant value Ab=128.2 (hereinafter referredto as ‘original-bit continuous value’) assuming that the result ofcorrection can take continuous values. In actuality, due to digitalprocessing, the conventional corrected value Jb becomes a discrete value128. FIG. 10C shows a case in which, where the input pixel value DIc is128 and the original-bit continuous value Ac is 128.7, the conventionalcorrected value Jc also becomes 128. FIG. 10D shows a case in which,where the input pixel value DId is 129 and the original-bit continuousvalue Ad is 128.9, the conventional corrected value Jd becomes 128.

Consequently, the prior art technology described above entails theproblem that even where the input pixel values DI are different, thecorresponding corrected values J are identical, and the tones associatedwith the input pixel values are lost.

The present invention was devised in order to resolve these problems,and an object thereof is to provide an image processing technology thatoffers superior tone expression and does not cause deterioration in tonereproducibility even where correction is performed using a tone curve.

DISCLOSURE OF THE INVENTION

In order to resolve the above problems, an image processing method forcorrecting pixel values of input pixels, comprising the steps of: (i)establishing a conversion relationship that indicates relationshipbetween the input pixel values and first tone-corrected values which arecorrected from the input pixel values; (ii) converting the input pixelvalues according to the conversion relationship into the firsttone-corrected values having a higher number of bits than the inputpixel values; and (iii) generating from the first tone-corrected valuessecond tone-corrected values having a smaller number of bits than thefirst tone-corrected values, wherein the step (iii) generates the secondtone-corrected values such that a tone of the first tone-correctedvalues is expressed by a plurality of the second tone-corrected valuesfor a plurality of mutually adjacent pixels.

According to this image processing method, because the input pixelvalues are converted into first tone-corrected values having a highernumber of tones, and a tone of the first tone-corrected values isexpressed by the second tone-corrected values for multiple pixels, animage with superior tone expression can be obtained. At the same time,because the number of bits of the second tone-corrected values issmaller than the number of bits of the first tone-corrected values,post-tone correction processes can be carried out without a significantincrease in the processing burden.

The second tone-corrected values may have the same number of bits as theinput pixel values.

According to this image processing method, because the number of bits ofthe data handled after the tone correction processing is identical tothe number of bits of the input pixel value, the processing burden afterthe tone processing does not change. Nevertheless, because the inputpixel values are converted into the first tone-corrected values having ahigher number of tones, and a tone of the first tone-corrected values isexpressed using the second tone-corrected values for multiple pixels, animage with superior tone expression can be achieved.

It is acceptable if a difference between the number of bits of the firsttone-corrected values and the number of bits of the input pixel valuesis larger than a difference between the number of bits of the firsttone-corrected values and the number of bits of the secondtone-corrected values.

According to this image processing method, because the number of tonesthat can be expressed by the second tone-corrected values increasesfactorially, tone expression can be increased dramatically.

The step (iii) may be a step in which the number of bits of the firsttone-corrected values is reduced using a dithering method.

The number of elements in the dithering matrix used in the step (iii)equals the number that is obtained by dividing the number of tones thatcan be expressed by the number of bits of the first tone-correctedvalues by the number of tones that can be expressed by the number ofbits of the second tone-corrected values. According to this imageprocessing method, an image exhibiting superior tone expression can beobtained via processing using a small-sized matrix.

The step (iii) may be a step that reduces the number of bits of thefirst tone-corrected values using an error diffusion method.

According to this image processing method, because errors occurringduring the bit number reduction are not conspicuous, a higher-qualityimage may be obtained.

The above image processing method may further comprise the steps ofexecuting, between the steps (ii) and (iii), a first image correctionprocess to the first tone-corrected values to correct the firsttone-corrected values; and executing, after the step (iii), a secondimage correction process using the second tone-corrected values.

It is preferable that the first image correction process is a processexecuted while a relatively small amount of image data is stored in abuffer memory, and the second image correction process is a processexecuted while a relatively large amount of image data is stored in thebuffer memory.

It is also preferable that the first image correction process includesaturation correction and that the second image correction processinclude sharpness adjustment.

The present invention may be realized in various forms, and may berealized in the form of an image processing apparatus or computerprogram that implements an image processing method, a recording mediumon which such computer program is recorded, or the like.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing the construction of an imageprocessing apparatus comprising an embodiment of the present invention;

FIG. 2 is a block diagram showing a tone conversion module 97incorporated in the first embodiment;

FIGS. 3A through 3E show the relationship between input pixel values DIand second tone-corrected values DM in the first embodiment;

FIG. 4 shows a different relationship between input pixel values DI andsecond tone-corrected values DM in the first embodiment;

FIGS. 5A through 5C show the relationship between input pixel values DIand second tone-corrected values DM in a second embodiment;

FIG. 6 shows the relationship between input pixel values DI and secondtone-corrected values DM in a third embodiment;

FIG. 7 is a block diagram showing the construction of a printer driverin a fourth embodiment;

FIG. 8 is a flow chart showing a processing sequence in the fourthembodiment;

FIG. 9 is a flow chart showing the detailed sequence of an enhancementprocess; and

FIGS. 10A through 10D show the relationship between input pixel valuesDI and second tone-corrected values DM in the conventional art.

BEST MODE FOR CARRYING OUT THE INVENTION

Embodiments of the present invention will be described in the followingsequence based on examples.

A. Construction of apparatus

B. First embodiment

C. Second embodiment

D. Third embodiment

E. Fourth embodiment

F. Variations

A. Construction of Apparatus

FIG. 1 is a block diagram showing the construction of an imageprocessing apparatus comprising an embodiment of the present invention.This image processing system includes a computer 90 and a printer 20.The image processing system that includes the printer 20 and thecomputer 90 can be generally termed an ‘image processing apparatus’.

In the computer 90, an application program 95 is executed under thecontrol of a prescribed operating system. The operating systemincorporates a video driver 91 and printer driver 96, and print data PDto be relayed to the printer 20 is output from the application program95 via these drivers. The application program 95 that performs imageediting and the like performs desired processing to the image to beprocessed, and displays the image on a CRT 21 via the video driver 91.

When a print command is issued by the application program 95, theprinter driver 96 of the computer 90 receives the image data from theapplication program 95 and converts it into print data PD to be suppliedto the printer 20. The printer driver 96 incorporates a tone conversionmodule 97, a color conversion module 98, a halftone module 99, arasterizer 100 and a color conversion lookup table LUT.

The tone conversion module 97 comprises a tone correction module 97 aand a bit number reduction module 97 b. The image data received from theapplication program 95 comprises multiple input pixel values DI, andeach input pixel value DI is converted by the tone correction module 97a into a first tone-corrected value DT having a larger number of bitsthan the input pixel value DI. The first tone-corrected value DT isconverted by the bit number reduction module 97 b into a secondtone-corrected value DM having a smaller number of bits than the firsttone-corrected value DT.

The second tone-corrected value DM is image information composed of thethree RGB color components. The color conversion module 98 uses thecolor conversion lookup table LUT to convert the RGB image data on apixel-by pixel basis into multiple-tone data for the multiple ink colorsthat can be used by the printer 20.

The converted multiple-tone data has 256 tones, for example. Thehalftone module 99 generates halftone data by carrying out so-calledhalftone processing. This halftone image data is arranged in the orderin which the data is to be relayed to the printer 20 by the rasterizer100 and is then output as final print data PD. The print data PDincludes raster data indicating the dot formation states for each mainscan pass and data indicating sub-scan feed amounts.

The printer driver 96 is equivalent to a program that implements thefunction to generate the print data PD by executing various types ofimage processing. The program to realize the functions of the printerdriver 96 is supplied in the form of a program recorded on acomputer-readable recording medium. This recording medium may consist ofa flexible disk, CD-ROM, magnetic disk, IC card, ROM cartridge, punchcard, printed matter on which a bar code or other symbols are printed,or any of other various types of computer-readable media, such as arecording device disposed inside the computer (such as RAM, ROM or othermemory) or outside the computer.

B. First Embodiment

FIG. 2 shows the tone conversion module 97 in a first embodiment. Inthis embodiment, the tone correction module 97 a performs tone curvecorrection to an eight-bit input pixel value DI to generate a 10-bitfirst tone-corrected value DT. The bit number reduction module 97 bcarries out the bit reduction processing described below to the 10-bitfirst tone-corrected value DT to generate an eight-bit secondtone-corrected value DM.

FIGS. 3A through 3E show the relationship between the input pixel valueDI and the second tone-corrected value DM. FIG. 3A is a tone curveshowing the relationship between the eight-bit input pixel value DI andthe 10-bit first tone-corrected value DT. The maximum value of 255 forthe input pixel value DI is set so as to correspond to the maximum valueof 1020 of the first tone-corrected value DT. The reason that themaximum value of the first tone-corrected value DT is smaller than themaximum value expressible by 10 bits (i.e., 1023) is described below.

FIG. 10B shows an example of the prior art technology in the case wherethe input pixel value DIb of 127 for a given input pixel is correctedusing a tone curve to generate a resultant value Ab=128.2 (hereinafterthe ‘original bit continuous value’) assuming that the result can takecontinuous values. The process for determining the first tone-correctedvalue DT in the first embodiment is described below using an example inwhich the input pixel value Dib is 127 and the original bit continuousvalue Ab is 128.2. As shown in FIG. 3B, the first tone-corrected valueDTb is a value derived by multiplying the original bit continuous valueAb by four and rounding off. The multiple ‘4’ is obtained by dividingthe number of tones that can be expressed by the number of bits of thefirst tone-corrected value DT (=1024) by the number of tones that can beexpressed by the input pixel value DI (=256). Therefore, the firsttone-corrected value DTh corresponding to the original bit continuousvalue Ab of 128.2 is 512.

The procedure for determining the second tone-corrected value DM willnow be described. Here, the 2×2 dithering matrix shown in FIG. 3E isintroduced. The dithering matrix P is a matrix in which the values of 0to 3 are allocated to the four pixels P1 through P4 arranged in a 2×2fashion. The total number of elements in the dithering matrix P is thesame value as that obtained by dividing the number of tones that can beexpressed by the number of bits of the first tone-corrected value DT(=1024) by the number of tones that can be expressed by the input pixelvalue DI (=256). The value of the second tone-corrected value DM isdetermined according to the following equation (1):DM=INT[(DT+Pi)/4]  (1)Here, INT[X] is a function that obtains an integer value by eliminatingthe decimal portion of a value X, and Pi is the value of the ith elementof the dithering matrix P where i is an integer from 1 to 4. The divisor‘4’ is a value obtained by dividing the number of tones that can beexpressed by the number of bits of the first tone-corrected value DT(=1024) by the number of tones that can be expressed by the secondtone-corrected value DM (=256). As shown in FIG. 3B, where all of thefirst tone-corrected values DTb corresponding to the four pixels in thedithering matrix P are 512, the second tone-corrected values DMb1, DMb2,DMb3 and DMb4 are all values of 128. The maximum value of the firsttone-corrected value DT obtained via the tone curve is set to 1020 sothat the maximum value of the first tone corrected value DT will makethe second tone-corrected value DM, according to the equation (1), to bethe maximum value of 255 that can be expressed by eight bits.

As shown in FIG. 3C, where the input pixel value DIc is 128 and theoriginal bit continuous value Ac is 128.7, the first tone-correctedvalue DTc becomes 514 via the same processing described above. When thedithering matrix P and the equation (1) are applied, the secondtone-corrected values DMc1 and DMc4 at two pixel positions become 128,while the second tone-corrected values DMc2 and DMc2 at the other twopixel positions become 129.

Similarly, as shown in FIG. 3D, where the input pixel value DId is 129and the original bit continuous value Ad is 128.9, the firsttone-corrected value DTd becomes 516. When the dithering matrix P andequation (1) are applied, the second tone-corrected value DMd1 at onepixel position becomes 128, while the second tone-corrected values DMd2,DMd3 and DMd4 at the other three pixel positions become 129.

In the examples shown in FIGS. 3B through 3D, the input pixel values DIfor four adjacent pixels are identical. The input pixel values DI may bedifferent from each other. FIG. 4 shows an example in which the inputpixel values DIf1, DIf2, DIf3 and DIf4 of adjacent input pixels are 127,128, 128 and 129, respectively. The first tone-corrected values DTcorresponding to the input pixel values of 127, 128 and 129 are 512, 514and 515. Therefore, the first tone-corrected values DTf1, DTIf2, DTf3and DTf4 become 512, 514, 514 and 515, respectively. As in the case ofFIGS. 3B through 3E, when the dithering matrix P and equation (1) areapplied, the second tone-corrected values DMf1, DMf2, DMf3 and DMf4become 128, 129, 129 and 129, respectively.

As described above, in the first embodiment, a tone of the firsttone-corrected values DT obtained by correcting the input pixel value DIbased on the tone curve is expressed by a plurality of pixels having thesecond tone-corrected values DM without increasing the number of bits ofthe second tone-corrected values DM beyond the number of bits of theinput pixel values DI. Not increasing the number of bits of the secondtone-corrected values DM means not increasing the number of bits of dataper color handled by the color conversion module 98 explained withreference to FIG. 1. Therefore, the memory and the processing speed neednot be increased dramatically.

C. Second Embodiment

FIG. 5A shows the tone correction module 97 in a second embodiment. Theinput pixel value DI has eight bits, the first tone-corrected value DThas (8+M) bits, and the second tone-corrected value DM has (8+M−N) bits.Here, M is an integer larger than one, and N is any positive integer.

FIG. 5B shows a tone curve. The tone curve is determined such that firsttone-corrected values DT ranging from 0 to (2^((8+M))·2^(N)) correspondto input pixel values DI ranging from 0 to (2⁸−1). The maximum value forthe first tone-corrected value DT is limited to (2 ^((8+M))−2^(N))because the values in the range from (2^((8+M))−2^((N+1))) to(2^((8+M))−1) will make the second tone-corrected value DM to exceed therange of values that can be expressed by the number (8+M−N) of bits ofthe second tone-corrected value DM during the bit reduction processcarried out by the bit number reduction module 97 b. The firsttone-corrected values DT corresponding to input pixel values DI areobtained in accordance with this tone curve.

FIG. 5C shows a dithering matrix P applied in the bit reduction module97 b. In this embodiment, the dithering matrix P has 2^(N) elements, andthe values of the elements of the dithering matrix P range from 0 to(2^(N)−1). Applying the dithering matrix P, the second tone-correctedvalue DM is determined according to the following equation (2):DM=INT[(DT+Pi)/2^(N])  (2)Here, INT[X] is a function that obtains an integer value by eliminatingthe decimal portion of a value X, and Pi is the value of the ith elementof the dithering matrix P where i is an integer from 1 to 2^(N).

In this way, even though the number of bits of the second tone-correctedvalues DM and handled in the processes following the process to obtainthe second tone-corrected values increases by only (M−N), the number oftones that can be reproduced by the second tone-corrected values DM canbe increased by a power of two. The number of tones that can bereproduced by the second tone-corrected values DT increases dramaticallyas the difference M between the number of bits of the firsttone-corrected values DT and the number of bits of the input pixelvalues DI becomes larger than the difference N between the number ofbits of the first tone-corrected values DT and the number of bits of thesecond tone-corrected values DM.

D. Third embodiment

FIG. 6 shows the relationship between input pixel values DI and secondtone-corrected values DM in a third embodiment. This embodiment is anexample in which the error diffusion method is applied in determiningthe second tone-corrected value DM from the first tone-corrected valueDT. The process until the first tone-corrected value DT is obtained fromthe input pixel value DI is identical to the corresponding processesdescribed above in connection with the first and second embodiments. Anexample will now be described in which the tone curve is identical tothat applied in the first embodiment and the number of bits of thesecond tone-corrected value DM is two bits smaller than the number ofbits of the first tone-corrected value DT.

Because the tone curve here is identical to that of the firstembodiment, where the input pixel values DIh of four adjacent inputpixels are all 128, the first tone-corrected values DTh1 through DTh4are 514, as shown in FIG. 6.

In the bit reduction process of the third embodiment, the firsterror-inclusive tone-corrected value DGi for the ith pixel is providedusing the following equation (3):DGi=DT+MOD[DG_(i−1), 2^(N])  (3)Here, MOD[X, Y] is a function to obtain the remainder of division of avalue X by Y, and N is the difference between the number of bits of thefirst tone-corrected value DT and the number of bits of the secondtone-corrected value DM. The second tone-corrected value DMi for the ithpixel is obtained via the equation (4) below:DMi=INT[DG_(i)/2^(N])  (4)

The above equation will be explained more specifically with reference toFIG. 6. The first error-inclusive value DGh1 is 514, which is equal tothe first tone-corrected value DTh1. The second error-inclusive valueDGh2 is 516, which is a sum of the second first tone-corrected valueDTh2 and two, which is the remainder of division of the error-inclusivevalue DGh1 by four. The third error-inclusive value DGh3 is 514, whichis a sum of the third first tone-corrected value DTh3 of 514 and zero,which is the remainder of division of the second error-inclusive valueDGh2 of 516 by four. Similarly, the fourth error-inclusive value DGh3 is516. The second tone-corrected value DM is obtained by dividing theerror-inclusive value DG sought in this fashion by four and rounding offfractions of the result of the division. In other words, as shown inFIG. 6, the second tone-corrected values DMh1, DMh2, DMh3 and DMh4respectively become 128, 129, 128 and 129. The number four used as adivisor in this embodiment is equal to 22, and is the value obtained bydividing the number of tones (=1024) expressible by the number of bitsof the first tone-corrected value DT by the number of tones (=256)expressible by the number of bits of the second tone-corrected value DM.

In this embodiment, as in the first embodiment, the errors caused by bitreduction can be made inconspicuous and subtle tones can be reproduced.

E. Fourth embodiment

FIG. 7 is a block diagram showing the construction of a printer driverof a fourth embodiment. It differs from the printer driver 96 shown inFIG. 1 only in that the tone conversion module 97 is replaced by animage correction module 200, and is otherwise identical to the printerdriver 96 shown in FIG. 1.

The image correction module 200 includes a correction parametergeneration module 202 and an enhancement processing module 204. Theenhancement processing module 204 has a function to perform variousimage correction processes (described below), as well as functions toserve as the tone correction module 97 a and the bit reduction module 97b. Here, ‘enhancement processing’ is processing to increase imagequality, and includes various image correction processes such as tonecorrection, color correction, saturation adjustment and the like. Thecorrection parameter generation module 202 creates various correctionparameters used during enhancement processing.

FIG. 8 is a flow chart showing the sequence of operations performed bythe image correction module 200. In step S10, the correction parametergeneration module 202 determines whether or not a print specificationtag is registered in the image data file to be processed. Here, a ‘printspecification tag’ has a data structure for storing various parametervalues used to carry out various image correction processes (such astone correction, color correction and saturation adjustment) when animage is printed. The print specification tag can be registered in anEXIF file, for example. An EXIF file is an image data file formatestablished by the Japan Electronics and Information TechnologyAssociation (JEITA).

When there is no print specification tag, processing by the imagecorrection module 200 ends and processing by the color conversion module98 (see FIG. 7) is begun. If a print specification tag does exist, onthe other hand, the image correction module 200 proceeds to step S12,wherein the correction parameter generation module 202 determineswhether or not an automatic image correction instruction is present inthe print specification tag. Here, ‘automatic image correction’ refersto a process in which correction parameter values are calculated viaimage sampling and analysis, and image correction is carried out usingthese correction parameter values. An instruction to carry out automaticimage correction may also be given via user input in the user interfacewindow of the printer driver.

When there is no automatic image correction instruction, the imagecorrection module 200 proceeds to step S19, and the enhancementprocessing in step S20 is carried out using the correction parametervalues included in the print specification tag.

When an automatic image correction instruction is present, the imagecorrection module 200 executes the processes of steps S14-S18. Thecorrection parameter generation module 202 first samples the image instep S14 and determines various parameter values to be used duringenhancement processing in accordance with the results of the sampling.Enhancement processing includes, for example, noise elimination, tonecorrection, memory color correction, saturation correction, HSB spacecolor correction, sharpness adjustment and the like. In step S18, thecorrection parameter values included in the print specification tag andthe correction parameter values created in step S16 are synthesized.This synthesis varies depending on the type of enhancement process, andinvolves execution of prescribed mathematical operations such asaddition or averaging. In step S20, the enhancement processing module204 performs various types of enhancement processing using the variouscorrection parameter values prepared as described above.

FIG. 9 is a flow chart showing the enhancement process in detail. Instep S22, noise elimination is carried out. Noise elimination is aprocess to harmonize very small characteristic pixel values included inan image with surrounding pixel values. This process is executed whileseveral lines' worth of image data is stored in the buffer memory (atemporary work memory). The image data to be processed is8-bits/color/pixel RGB data.

In step S24, tone correction is carried out. This tone correction isidentical to the tone correction described in connection with the firstthrough third embodiments. In this process, the number of bits of theRGB data is increased from eight bits to 10 bits, for example.

Because this tone correction is performed for each pixel, image data forseveral lines' worth of image data need not be stored in the buffermemory, such that the process is carried out with image data for onlyone line (or one pixel) stored in the buffer memory. In this regard, theprocess is identical to the processes of steps S26 through S30 describedbelow.

In step S26, memory color processing is carried out for each of multipleprescribed specific color ranges (skin color, sky blue, green, red).This enables colors in prescribed color ranges to be corrected to thepreferred color. In step S28, saturation correction is carried out. Thissaturation correction is a process in which saturation is increased viaRGB value correction intended to increase the difference between themaximum and minimum RGB values (corresponding to saturation) for eachpixel, for example. In step S30, color correction is carried out usingthe HSB (Hue, Saturation, Brightness) space. The HSB space is alsocalled the HSI (Hue, Saturation, Intensity) space, and is a color spacethat expresses a given color in terms of the three attributes of hue,saturation and brightness. Because the three attributes (hue,saturation, brightness) can be corrected directly in the HSB space, itenables desired color correction to be performed more accurately thanwhen the RGB space is used. However, because color space conversion mustbe carried out during processing, the time required for processingincreases.

The processing of steps S24 through S30 is carried out while the imagedata for one line (or one pixel) is stored in the buffer memory. Inaddition, the image data to be processed is 10-bits/color/pixel data or10-bits/attribute/pixel data. Because these processes are carried out to10-bit data, processing can be performed more accurately than when 8-bitdata is processed.

In step S32, bit number reduction processing is performed. This bitnumber reduction processing is identical to that performed in connectionwith the first through third embodiments described above. In this bitnumber reduction processing, the number of bits of RGB data is reducedfrom 10 bits to 8 bits, for example.

In step S34, sharpness adjustment is performed. Sharpness adjustment isa process in which sharpness is adjusted by correcting the pixel valuesfor each pixel in accordance with the pixel values for surroundingpixels. Therefore sharpness adjustment is performed while image data forseveral lines' worth of image data is stored in the buffer memory.

As described above, the processes of steps S22 and S34 are carried outwhile image data for multiple lines is stored in the buffer memory, andthe image data to be processed is 8-bits/color/pixel data. On the otherhand, the processes of steps S24 through S30 are carried out while imagedata for one line is stored in the buffer memory, and the image data tobe processed is 10-bits/color/pixel data or 10-bits/attribute/pixeldata. In other words, in the fourth embodiment, processes in which arelatively large amount of image data is stored in the buffer memory areperformed to image data having a relatively small number of bits, whileprocesses in which a relatively small amount of image data is stored inthe buffer memory are performed to image data having a relatively smallnumber of bits. As a result, some enhancement processing can be carriedout with high precision using a relatively high bit number withoutincreasing the size of the buffer memory excessively.

One or more of the processes described above may be omitted fromenhancement processing, and other processes may be included therein.However, it is preferred that enhancement processing (image correctionprocessing) include at least tone correction, saturation correction andsharpness adjustment.

F. Variations

The present invention is not limited to the examples and embodimentsdescribed above, and may be implemented in various forms within theessential scope thereof. For example, the variations described below areincluded within the scope of the present invention.

F1. Variation 1

The dithering matrix P applied in the first and second embodiments maybe a two-dimensional matrix in which the numbers of columns and rows aredifferent, or may be a one-dimensional matrix.

F2. Variation 2

While a tone curve is used during tone correction in the aboveembodiments, the tone correction may be performed using a conversionrelationship having a configuration other than that of a tone curve.

F3. Variation 3

In connection with the above embodiments, the example of an imageprocessing method and image processing apparatus using a computer andserial printer was described, but the present invention is not limitedto this implementation, and may be realized in various other forms. Forexample, the image processing apparatus of the present invention maycomprise a digital camera, scanner, facsimile machine, copier, lineprinter or page printer, and the present invention may be applied as theimage processing method for such image processing apparatus.Furthermore, the image processing method of the present invention may beimplemented as either software or hardware.

INDUSTRIAL APPLICABILITY

The present invention is applicable to an image processing apparatus, aprinter that includes image processing functions, an image processingprogram and the like.

1. An image processing method for correcting pixel values of inputpixels, comprising the steps of: (i) establishing a conversionrelationship that indicates relationship between the input pixel valuesand first tone-corrected values which are corrected from the input pixelvalues; (ii) converting the input pixel values according to theconversion relationship into the first tone-corrected values having ahigher number of bits than the input pixel values; and (iii) generatingfrom the first tone-corrected values second tone-corrected values havinga smaller number of bits than the first tone-corrected values, whereinthe step (iii) generates the second tone-corrected values such that atone of the first tone-corrected values is expressed by a plurality ofthe second tone-corrected values for a plurality of mutually adjacentpixels.
 2. An image processing method according to claim 1, wherein thesecond tone-corrected values have the same number of bits as the inputpixel values.
 3. An image processing method according to claim 1,wherein a difference between the number of bits of the firsttone-corrected values and the number of bits of the input pixel valuesis larger than a difference between the number of bits of the firsttone-corrected values and the number of bits of the secondtone-corrected values.
 4. An image processing method according to claim1, wherein the step (iii) is a step in which the number of bits of thefirst tone-corrected values is reduced using a dithering method.
 5. Animage processing method according to claim 1, wherein the step (iii) isa step in which the number of bits of the first tone-corrected values isreduced using an error diffusion method.
 6. An image processing methodaccording to claim 1, further comprising the steps of: executing,between the steps (ii) and (iii), a first image correction process tothe first tone-corrected values to correct the first tone-correctedvalues; and executing, after the step (iii), a second image correctionprocess using the second tone-corrected values.
 7. An image processingmethod according to claim 6, wherein the first image correction processis a process executed while a relatively small amount of image data isstored in a buffer memory, and the second image correction process is aprocess executed while a relatively large amount of image data is storedin the buffer memory.
 8. An image processing method according to claim7, wherein the first image correction process includes saturationcorrection and the second image correction process includes sharpnessadjustment.
 9. An image processing apparatus for correcting pixel valuesof input pixels, comprising: a memory configured to store a conversionrelationship that indicates relationship between the input pixel valuesand first tone-corrected values which are corrected from the input pixelvalues; a first processing module configured to convert the input pixelvalues according to the conversion relationship into the firsttone-corrected values having a higher number of bits than the inputpixel values; and a second processing module configured to generatingfrom the first tone-corrected values second tone-corrected values havinga smaller number of bits than the first tone-corrected values, whereinthe second processing module generates the second tone-corrected valuessuch that a tone of the first tone-corrected values is expressed by aplurality of the second tone-corrected values for a plurality ofmutually adjacent pixels.
 10. An image processing apparatus according toclaim 9, wherein the second tone-corrected values have the same numberof bits as the input pixel values.
 11. An image processing apparatusaccording to claim 9, wherein a difference between the number of bits ofthe first tone-corrected values and the number of bits of the inputpixel values is larger than a difference between the number of bits ofthe first tone-corrected values and the number of bits of the secondtone-corrected values.
 12. An image processing apparatus according toclaim 9, wherein the second processing module reduces the number of bitsof the first tone-corrected values using a dithering method.
 13. Animage processing apparatus according to claim 9, wherein the secondprocessing module reduces the number of bits of the first tone-correctedvalues using an error diffusion method.
 14. An image processingapparatus according to any of claim 9, further comprising: a first imagecorrection processing module configured to execute, between theprocesses by the first and second processing modules, a first imagecorrection process to the first tone-corrected values to correct thefirst tone-corrected values; and a second image correction processingmodule configured to execute, after the process by the second processingmodule, a second image correction process using the secondtone-corrected values.
 15. An image processing apparatus according toclaim 14, wherein the first image correction process is a processexecuted while a relatively small amount of image data is stored in abuffer memory, and the second image correction process is a processexecuted while a relatively large amount of image data is stored in thebuffer memory.
 16. An image processing apparatus according to claim 15,wherein the first image correction process includes saturationcorrection and the second image correction process includes sharpnessadjustment.
 17. A computer program, stored on a computer readablemedium, for correcting pixel values of input pixels for causing acomputer to implement: a first processing function to convert the inputpixel values, according to conversion relationship that indicatesrelationship between the input pixel values and first tone-correctedvalues which are corrected from the input pixel values, into the firsttone-corrected values having a higher number of bits than the inputpixel values; and a second processing function to generating from thefirst tone-corrected values second tone-corrected values having asmaller number of bits than the first tone-corrected values, wherein thesecond processing function generates the second tone-corrected valuessuch that a tone of the first tone-corrected values is expressed by aplurality of the second tone-corrected values for a plurality ofmutually adjacent pixels.
 18. A computer program according to claim 17,wherein the second tone-corrected values have the same number of bits asthe input pixel values.
 19. A computer program according to claim 17,wherein a difference between the number of bits of the firsttone-corrected values and the number of bits of the input pixel valuesis larger than a difference between the number of bits of the firsttone-corrected values and the number of bits of the secondtone-corrected values.
 20. A computer program according to claim 17,wherein the second processing function reduces the number of bits of thefirst tone-corrected values using a dithering method.
 21. A computerprogram according to claim 17, wherein the second processing functionreduces the number of bits of the first tone-corrected values using anerror diffusion method.
 22. A computer program according to claim 17,further comprising: a first image correction processing function toexecute, between the processes by the first and second processingfunctions, a first image correction process to the first tone-correctedvalues to correct the first tone-corrected values; and a second imagecorrection processing function to execute, after the process by thesecond processing function, a second image correction process using thesecond tone-corrected values.
 23. A computer program according to claim22, wherein the first image correction process comprises a processexecuted while a relatively small amount of image data is stored in abuffer memory, and the second image correction process comprises aprocess executed while a relatively large amount of image data is storedin the buffer memory.
 24. A computer program according to claim 23,wherein the first image correction process includes saturationcorrection and the second image correction process includes sharpnessadjustment.